/**
 * 
 */
package simulation;

import java.util.Random;

/**
 * @author aclayton
 *
 */
public class Robot {
	private int robotNumber;
	private double radius;
	
	public Robot(int number, double radius){
		this.robotNumber = number;
		this.radius = radius;
	}
	
	public int getRobotNumber(){
		return robotNumber;
	}
	
	public double getRadius(){
		return radius;
	}
	/*
	public boolean intersectsObstacle(Obstacle ob){
		return false;
	}
	
	public boolean intersectRobot(Robot r){
		double dis = center.getDistance(r.center);
		if(dis > radius+r.radius)
			return false;
		return true;
	}*/
	
	
	public String toString(){
		return "Robot(" +robotNumber+","+ radius + ")";
	}
	/*
	public static Robot createRandomInBox(Rect boundingbox, double radius){
		Random r = new Random();
		
		double x = r.nextDouble()*boundingbox.getWidth()+boundingbox.getLeft();
		double y = r.nextDouble()*boundingbox.getHeight()+boundingbox.getBottom();
		
		return new Robot(new Point(x,y), radius);
	}
	*/
	public static Robot createFromString(String input){
		String temp = input;
		String[] strs = temp.split("\\(");
		temp = strs[1];
		strs = temp.split("\\)");
		temp = strs[0];
		strs = temp.split(",");
		
		int number = Integer.parseInt(strs[0]);
		double radius = Double.valueOf(strs[1]);
		
		return new Robot(number, radius);
	}

}
